"""kaoshi URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from . import views

urlpatterns = [
    path('cate_api',views.CateView.as_view()), # 分类的增删改查操作路劲
    path('goods_api',views.GoodsView.as_view()), # 商品的增删改查操作路劲
    path('color_api',views.ColorView.as_view()),# 颜色的增删改查操作路劲
    path('version_api',views.VersionView.as_view()),# 版本的增删改查操作路劲
    path('goods',views.GoodsShowView.as_view()), # 通过分类查找商品
    path('detail<goods_id>',views.DetailView.as_view()), # 通过商品id来获取商品详情
    path('add_cart',views.AddCartView.as_view()), # 通过商品id来获取商品详情
    path('show_cart',views.ShowCartView.as_view()),# 展示购物车
    path('add_num',views.AddNumView.as_view()), # 增加数量
    path('min_num',views.MinNumView.as_view()), # 减少数量
    path('del_cart',views.DeleteCartView.as_view()), # 删除购物车内商品


]
